package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.WhPurchase;
import com.dingreading.cloud.common.util.PageDto;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.service.IService;

import java.util.Date;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface WhPurchaseService extends IService<WhPurchase> {

    // 实时获取最新的已入库数和剩余库存数
    PageDto<WhPurchase> pageListRealNum(PageUtil pageUtil, String keyword, Integer status);

    WhPurchase getByCode(String code);

    WhPurchase getBeanByCode(String code);

    int dropData(String code);

    boolean cancel(String code, Long operatorId, String operator, String operateRemark, Date time);

    boolean cancel(String code, String operatorUid, String operator, String operateRemark, Date time);

    boolean updateWaitIn(String code);

    // 设置入库中
    boolean updateEntering(String code);

    boolean setOk(String code, Long operatorId, String operator, String remark, Date time);

    boolean setOk(String code, String operatorUid, String operator, String remark, Date time);


    boolean notRealSetOk(String code, String operatorUid, String operator, Date time);

    boolean updateExpressInfo(String code, String expressInfo, Double expressPrice);

    long getSupplierCnt(Long supplierId);

}
